﻿<Window x:Class="GuiLayer.ApKlantenToonAlle"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ApKlantenToonAlle" Height="392" Width="464"
         DataContext = "{Binding RelativeSource={RelativeSource Self}}">
    <Window.Resources>
        <CollectionViewSource x:Name="MyCollection" x:Key="klantenViewSource" Source="{Binding Path=KlantenLijst, Source={x:Static Application.Current}}">
        </CollectionViewSource>
    </Window.Resources>

    <Grid DataContext="{Binding KlantenLijst}" Margin="0, 0, 0, 13">
        <Grid.RowDefinitions>
            <RowDefinition Height="160*"/>
            <RowDefinition Height="159*"/>
        </Grid.RowDefinitions>
        <ListView Grid.Row="0" Margin="10,10,0,0" ItemsSource="{Binding}" SelectionMode="Single" SelectionChanged="ListView_SelectionChanged" >
            <ListView.View >
                <GridView>
                    <GridViewColumn x:Name="KlantNr" Header="KlantNr" Width="50">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding Klantnr}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="naam" Header="Naam" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding naam}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="voornaam" Header="Voornaam" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding voornaam}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="adres" Header="Adres" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding adres}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="postcode" Header="Postcode" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding postcode}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="telefoon" Header="Telefoon" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding telefoon}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="email" Header="Email" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding email}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn x:Name="getrouwheidsKm" Header="Getrouwheids Km" Width="100">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBox Text="{Binding getrouwheidsKm}"></TextBox>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <Grid HorizontalAlignment="Left" Height="78" Margin="0,98,0,-3" VerticalAlignment="Top" Width="456" Grid.Row="1"/>
        <Button x:Name="btnTerug" Content="Terug" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,10,0,0" Grid.Row="1" Click="btnTerug_Click"/>

    </Grid>
</Window>
